package files_controller_with_factory;
import org.apache.log4j.*;


public class CdCommandExecutor implements ICommandExecutor{
	private static final Logger logger = Logger.getLogger(CdCommandExecutor.class);
	private static final Logger cont_log = Logger.getLogger("control");
	
	public void execute(String string){
		String[] str_mas = string.split(" ");
		String current_path = str_mas[1];
		Controller.relative_path = current_path;
		cont_log.info("Default path " + str_mas[1] + " was enabled");
	}
	
	private static CdCommandExecutor instance;
	private CdCommandExecutor(){		
	}
	public static ICommandExecutor getInstance(){
		if(instance==null){
			instance = new CdCommandExecutor();
		}
		return instance;
	}
}
